<h1 class="title">Changer mon pseudo</h1>

<?php foreach($form as $field => $f): ?>
    <?php $attributes[$field] = array() ?>
<?php endforeach ?>

<?php if ($form->hasErrors()): ?>
    <?php foreach($form as $field => $f): ?>
      <?php if($f->hasError()): ?>
        <?php $attributes[$field] = array('class' => 'error') ?>
      <?php endif ?>
    <?php endforeach ?>
    <div class="box_relief red">Le champ est incomplet et/ou invalide.</div>
<?php endif; ?>

<form method="post" name="<?php echo $form->getName()?>" action="<?php echo url_for($sf_request->getUri()) ?>" <?php $form->isMultipart() and print 'enctype="multipart/form-data"' ?>>
    <table>
        <tr>
            <td></td>
            <td><?php echo $form['username']->renderError(); ?></td>
        </tr>
        <tr>
            <td><?php echo $form['username']->renderLabel('Choisissez un NOUVEAU pseudo : ', $attributes['username']); ?></td>
            <td><?php echo $form['username']->render(); ?></td>
        </tr>
        <tr>
            <td colspan="2"><?php echo $form->renderHiddenFields(); ?></td>
        </tr>
    </table>
    <input type="submit" class="box_relief dark_blue" value="Valider" />
</form>